package io.gitee.hefren.hhcache.command;

import io.gitee.hefren.hhcache.core.Command;
import io.gitee.hefren.hhcache.core.CommandEnum;
import io.gitee.hefren.hhcache.core.HhCache;
import io.gitee.hefren.hhcache.core.Reply;

/**
 * @Date 2024/7/9
 * @Author lifei
 */
public class InfoCommand implements Command {
    private static final String INFO_VAL = "HhCache version 0.0.1, create by hefren" + CRLF
            + "Mock server at 2024-06-30 23:24:00, at BeiJing." + CRLF;
    @Override
    public String name() {
        return CommandEnum.INFO.name();
    }

    @Override
    public Reply<?> exec(HhCache cache, String[] args) {
        return Reply.bulkStringReply(INFO_VAL);
    }
}
